﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPages/OuterMaster.master" CodeFile="ForgotPassword.aspx.cs" Inherits="Login" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <style type="text/css">
        .shadow {
            box-shadow: inset 0 0 25px #000000;
            border-radius: 6px;
        }
    </style>
    <script type="text/javascript">
        function fn_ValidateChangePass()
        {
            return Page_ClientValidate('ChangePass');
        }
    </script>
    <table class="shadow" style="vertical-align: central; margin-left: 10%; margin-bottom: 0px; width: 75%;">
        <tr>
            <td align="center" colspan="2">
                <h3>Forgot Password</h3>
            </td>
        </tr>
        <tr>
            <td align="center" class="auto-style4">&nbsp;</td>
            <td align="center">
                <a href="../Login.aspx">Back to Login</a>&nbsp;</td>
            <asp:HiddenField ID="hdnEmailID" runat="server" ClientIDMode="Static" />
        </tr>
        <tr>
            <td align="center" colspan="2">
                <br />
                <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>

                        <table style="vertical-align: central">
                            <tr id="trEmailInfo" runat="server">
                                <td class="auto-style2"></td>
                                <td class="auto-style1" style="text-align: right;">Email ID<font color="red"> *</font>&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                                <td class="auto-style1">
                                    <asp:TextBox ID="txtEmailID" TextMode="Email" placeholder="Enter Email ID" runat="server" Width="251px"></asp:TextBox></td>

                                <td class="auto-style3">&nbsp;<asp:RequiredFieldValidator ValidationGroup="gpemail" ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtEmailID" ForeColor="Red" ErrorMessage="Enter Email ID"></asp:RequiredFieldValidator>
                                    <%--<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ValidationGroup="gpemail" ControlToValidate="txtEmailID" ValidationExpression="^(?("")("".+?""@)|(([0-9a-zA-Z]((\.(?!\.))|[-!#\$%&'\*\+/=\?\^`\{\}\|~\w])*)(?<=[0-9a-zA-Z])@))(?(\[)(\[(\d{1,3}\.){3}\d{1,3}\])|(([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,6}))$" ErrorMessage="RegularExpressionValidator"></asp:RegularExpressionValidator>--%>
                                </td>
                            </tr>
                            <tr style="height: 10px;">
                                <td colspan="4">
                            </tr>
                            <tr runat="server" id="checkemail">
                                <td colspan="4" class="auto-style2">
                                    <div id="btnemailcheck" align="center">
                                        <asp:Button ID="btnemail" runat="server" Text="Reset Your Password" ValidationGroup="gpemail" OnClick="btnemail_Click" />
                                    </div>
                                </td>
                            </tr>
                            <tr runat="server" id="trSuccessMsg">
                                <td colspan="4" class="auto-style2">
                                    <div align="center" style="font-size: 20px" id="tdSuccessMsg" runat="server">
                                        
                                    </div>
                                </td>
                            </tr>
                            <tr runat="server" id="question">
                                <td class="auto-style2"></td>
                                <td style="text-align: right;">Secret Question<font color="red"> *</font>&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                                <td class="auto-style1">
                                    <asp:TextBox ID="txtsecret" placeholder="Secret Question" Enabled="false" runat="server" Width="251px" /></td>
                                <td class="auto-style3">&nbsp;
                                </td>
                            </tr>
                            <tr runat="server" id="Answare">
                                <td class="auto-style2"></td>
                                <td style="text-align: right;">Answer<font color="red"> *</font> &nbsp;&nbsp;:&nbsp;&nbsp;</td>
                                <td>
                                    <asp:TextBox ID="txtanswer" placeholder="Answer" runat="server" Width="252px" /></td>
                                <td class="auto-style3">&nbsp;<asp:RequiredFieldValidator ValidationGroup="gpset" ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtanswer" ForeColor="Red" ErrorMessage="Enter Answer"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr id="trChangePassword1" runat="server">
                                <td align="right">Password &nbsp;<font color="red">*</font></td>
                                <td>&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                                <td align="left">
                                    <asp:TextBox ID="txtPassword" placeholder="Enter Password" runat="server" TextMode="Password" Width="220px" MaxLength="256"></asp:TextBox>&nbsp;
                                    <asp:RequiredFieldValidator ID="reqPassword" Display="Dynamic" ForeColor="red" ControlToValidate="txtPassword" runat="server" ValidationGroup="ChangePass" ErrorMessage="Enter Password">
                                    </asp:RequiredFieldValidator><asp:RegularExpressionValidator Display="Dynamic" ControlToValidate="txtPassword" ID="regePassword" ErrorMessage="Enter Valid Password" ValidationExpression="^(?=.*[!@#$%?]{1,})[0-9a-zA-Z!@#$%?]{7,}" runat="server" ValidationGroup="ChangePass" ForeColor="red"></asp:RegularExpressionValidator>
                                    <asp:HiddenField ID="hdnPassword" runat="server" />
                                    <br />
                                    Provide minimum 7 characters including one special character (#,@,&,$,%)
                                </td>
                            </tr>
                            <tr id="trChangePassword2" runat="server">
                                <td>&nbsp;</td>
                                <td>&nbsp;</td>
                                <td>&nbsp;</td>
                            </tr>
                            <tr id="trChangePassword3" runat="server">
                                <td align="right">Re-enter Password &nbsp;<font color="red">*</font></td>
                                <td>&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                                <td align="left">
                                    <asp:TextBox ID="txtReenterPassword" placeholder="Re-enter Password" TextMode="Password" runat="server" Width="220px" MaxLength="256"></asp:TextBox>&nbsp;<asp:RequiredFieldValidator ID="reqReenterPassword" Display="Dynamic" ForeColor="red" ControlToValidate="txtReenterPassword" runat="server" ValidationGroup="NextValidation" ErrorMessage="Re-enter Password"></asp:RequiredFieldValidator>
                                    <asp:CompareValidator ID="cvPassword" ValidationGroup="ChangePass" Display="Dynamic" ForeColor="red" ControlToValidate="txtReenterPassword" ControlToCompare="txtPassword" runat="server" ErrorMessage="Password do not match."></asp:CompareValidator>
                                </td>
                            </tr>

                        </table>
                        </div><br />
                        <div id="btnsubmit" runat="server" align="center">
                            <asp:Button ID="cmdsubmit" runat="server" Text="Submit" ValidationGroup="gpset" OnClick="cmdsubmit_Click" />
                        </div>
                        <div id="divChangePassword" runat="server" align="center">
                            <asp:Button ID="cmdChangePassword" runat="server" Text="Change Password" OnClientClick="return fn_ValidateChangePass()" ValidationGroup="gpset" OnClick="cmdChangePassword_Click" />
                        </div>
                        <div align="center" style="color: red;">
                            <asp:Label ID="ErrorMsg" runat="server"></asp:Label>
                        </div>
                    </ContentTemplate>
                </asp:UpdatePanel>
                <br />

                <br />
                <%-- <br clear="all" />--%>
                <br />
                <br />
                <br />

            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="head">
    <style type="text/css">
        .auto-style4 {
            width: 575px;
        }
    </style>
</asp:Content>

